open printing
Type
command
Summary
Begins a batch print job, which allows more than one card to be printed on a page.
Syntax
open printing [with dialog [as sheet]]
Description
Use the open printing command to print multiple cards.
Normally, the print command prints each card on a separate page. If you use the open printing command before issuing the print commands for the cards you want to print, the printing is delayed until all the cards have been specified. This causes the cards to be printed as one batch.
The open printing with dialog form opens the print dialog box on Mac OS systems. On Unix or Windows systems, this form acts like the open printing form, and no dialog box appears. If the as sheet form is used, the dialog box appears as a sheet on OS X systems.
The following handler prints cards that have been collected in a global variable:
on printSomeCards
global cardsToPrint
open printing with dialog
repeat with x = 1 to the number of lines of cardsToPrint
print card (line x of cardsToPrint)
end repeat
close printing -- send group of cards to printer
end printSomeCards
On Linux, the printing commands use revpdfprinter to generate a PDF to send to the system printing system. If building a standalone, make sure you have selected 'revpdfprinter' in the inclusion options.
Examples
open printing
open printing with dialog
open printing with dialog as sheet
open printing
repeat with x = 1 to the number of cards
print card
end repeat
close printing
Related
object: card
property: printTitle, printRowsFirst
command: cancel printing, print, close printing, revBrowserPrint, answer printer, answer page setup
keyword: card
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
Platforms
desktop